<template>
  <div class="header-tool">
    <el-button class="btn" type="primary" @click="addUser">+ 新增</el-button>
    <common-form
      :formLabel="formLabel"
      :form="seachForm"
      :inline="true"
      ref="form"
    >
      <el-button type="primary" @click="getList(seachForm.keyword)">搜索</el-button>
    </common-form>
  </div>
</template>

<script>
import CommonForm from '@/components/content/commonform/CommonForm.vue'

export default {
  components: { CommonForm },
  name: 'CommonHeadtls',
  props: {
    formLabel: Array,
    seachForm: Object,
  },
  methods: {
    addUser() {
      this.$emit('addUser')
    },
    getList(keyword) {
      this.$emit('getList', keyword)
    }
  }
}
</script>

<style lang='less' scoped>
.header-tool {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  .btn {
    margin-left: 15px;
  }
}
</style>